list='1 2 3 4 5'

# for循环
for item in $list
do
    echo $item
done

# 一行写法
for item in $list;do echo $item;done

# C风格
for (( i=0; i<3; i++ ))
do
    echo hello $i
done

# 死循环
for ((;;))
do
    echo $?
done